<%@page import="java.sql.ResultSet"%>
<%@page import="java.util.Date"%>
<%@page import="java.util.Calendar"%>
<%@page language="Java" import="java.sql.*" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>ANALISIS Y DISEÑO 2</title> 
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="../CSS/default.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="../JS/validar_formulario.js"></script>
<script type="text/javascript" src="../JS/funciones.js"></script>
<script type="text/javascript" src="../JS/jquery-1.4.2.min.js"></script>
                
</head>
<body>
<!-- start header -->
<jsp:useBean id="db" scope="request" class="conexion.DB" />
<div id="header">
<img src="../imagenes/usac1.jpg"/>        
	<h1><a href="#">FANTASY FOOTBALL</a></h1>
	<p><a href="#">USAC - AYD2</a></p>
        
       

</div>
<!-- end header -->
<!-- star menu -->
<div id="menu">
	<ul>
		<li class="current_page_item"><a href="../index.jsp">INICIO</a></li>
		<li><a href="liga.jsp">LIGAS</a></li>
		<li><a href="equipo.jsp">EQUIPOS</a></li>                
                <li><a href="jugador.jsp">JUGADORES</a></li>
	</ul>
</div>
<!-- end menu -->
<!-- start page -->
<div id="page">
	<!-- start content -->
	<div id="content">
		<div class="post">
			<div class="title">
				<h2><a href="../index.jsp">Registro</a></h2>
				<p><small>fase 2 </small></p>
			</div>	
                    
                 
                    <form id="registro" name="registro" method="post" action="registro.jsp">
                            <div>
				<fieldset>
                                    <p class="links">  <a class="comments">1) Datos Personales: <label id="msg" for=""></label></a> </p>                           
                                <div><p></p></div>
                                <div><span><font color="red">*</font>Nombre:</span></div>
                                <div>
                                <div><input type="text" name="nombre" id="nombre" size="35" value="" /></div>				
                                <div><p></p></div>
                                <div><span><font color="red">*</font>Apellido: </span></div>
				<div><input type="text" name="apellido" id="apellido" size="35" value="" /></div>                                                               
                                <div><p></p></div>
                                <div><span><font color="red">*</font>E-mail: </span></div>
				<div><input type="text" name="correo" id="correo" size="35" value="" /></div>                                  
                                <div><p></p></div>
                                <div><span><font color="red">*</font>Direccion: </span></div>
				<div><input type="text" name="direccion" id="direccion" size="35" value="" /></div>                                  
                                <div><p></p></div>
                                <div><span><font color="red">*</font>Sexo: </span></div>				                                
                                    <select id="sexo" name="sexo" class="selects">
                                    <option value="-1">Seleccione un Sexo</option>
                                    <option value="M">Masculino</option>
                                    <option value="F">Femenino</option>
                                </select>
                                <div><p></p></div>
                                <div><span><font color="red">*</font>Pais: </span></div>				
                        <% 
                            if(db.connect()){
                                ResultSet rs=  null;
                                String opciones = "";                           
                                out.write("<select name=\"pais\" id=\"pais\" class=\"selects\">");
                                out.write("<option value=-1>Elija un Pais</option>");
                                
                               try{
                                rs = db.seleccionar("*", "Country", "1");

                                while(rs.next()){
                                   opciones += "<option value=\""+rs.getInt(1) +"\">"+rs.getString(2) +"</option>";
                                }
                                }catch(Exception e){
                                    opciones += "error = " + e.toString();
                                }
                                out.write(opciones);
                                 /*out.write("<option value=2>" + db.seleccionar("*", "country", "1")+"</option>");*/
                                out.write("</select>");
                            }else{
                                out.write("<p><small><font color=red>Error al cargar los datos</font></small></p>");
                            }
                        %>
                                    
                                <div><p></p></div>
                                <div><span><font color="red">*</font>Fecha de Nacimiento: </span></div>				                                
                                <select id="mes" name="mes" class="selects">
                                <option value="-1">MM</option>
                                <option value="1">Ene.</option>
                                <option value="2">Feb.</option>
                                <option value="3">Mar.</option>
                                <option value="4">Abr.</option>
                                <option value="5">May.</option>
                                <option value="6">Jun.</option>
                                <option value="7">Jul.</option>
                                <option value="8">Ago.</option>
                                <option value="9">Sep.</option>
                                <option value="10">Oct.</option>
                                <option value="11">Nov.</option>
                                <option value="12">Dic.</option>
                                </select>                                
                                <select id="dia" name="dia" class="selects">
                                <option value="-1">DD</option>
                                <option value="1">1</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                                <option value="4">4</option>
                                <option value="5">5</option>
                                <option value="6">6</option>
                                <option value="7">7</option>
                                <option value="8">8</option>
                                <option value="9">9</option>
                                <option value="10">10</option>
                                <option value="11">11</option>
                                <option value="12">12</option>
                                <option value="13">13</option>
                                <option value="14">14</option>
                                <option value="15">15</option>
                                <option value="16">16</option>
                                <option value="17">17</option>
                                <option value="18">18</option>
                                <option value="19">19</option>
                                <option value="20">20</option>
                                <option value="21">21</option>
                                <option value="22">22</option>
                                <option value="23">23</option>
                                <option value="24">24</option>
                                <option value="25">25</option>
                                <option value="26">26</option>
                                <option value="27">27</option>
                                <option value="28">28</option>
                                <option value="29">29</option>
                                <option value="30">30</option>                                
                                <option value="31">31</option>                                
                                </select>                                
                                <input type="text" name="anio" maxlength="4" id="anio" size="15" value="AAAA" />
                                   <div><p></p></div>
                                      <div><p></p></div>
                                      <p class="links"><a class="comments">2) Datos de la Cuenta:</a> </p>                           
                                
                                
                                <div><p></p></div>
                                <div><span><font color="red">*</font>Valor del Dinero: </span></div>
                                <div><span><select id="tipo_dinero" name="tipo_dinero">
                                            <option value="0">Ficticio</option>
                                            <option value="1">Real</option>
                                        </select></span></div>
                                <div><p></p></div>
                                <div><span><font color="red">*</font>Contraseña: </span></div>
				<div><input type="password" name="contra" id="contra" size="35" value="" /></div>                                                               
                                <div><p></p></div>
                                <div><span><font color="red">*</font>Repetir Contraseña: </span></div>
				<div><input type="password" name="contra2" id="contra2" size="35" value="" /></div>                                  
                                <div><p></p></div>
                                <div><p></p></div>
                                <center> 
                                    <input type="button" onclick="aceptar()" id="x" value="REGISTRAR" />
                                    <BR>
                                    Por favor ingrese todos los campos con asterisco(<font color="red">*</font>)<br>
                                </center>                               
				</fieldset> 
                                </div>
			</form>
                    
                    
                    
		</div>
		<div class="post">
			<div class="entry">
				<blockquote>
				</blockquote>
			</div>
			<p class="links">  <a href="../index.jsp" class="comments">Inicio</a> </p>
                        <CENTER>
                         <H2></H2>
                         <% 
                         Date fecha = new Date();
                         out.print("<b>Hoy es:</b> ");
                         out.print(fecha.getDate());
                         out.print(" / ");
                         out.print(fecha.getMonth()+1);
                         out.print(" / ");
                         out.print(fecha.getYear()+1900);
                         %>
                         </CENTER> 
		</div>
	</div>
	<!-- end content -->
	<!-- start sidebar -->
	<div id="sidebar">
		
		<ul>
			<li id="categories">
				<h2>MENU</h2>
				<ul>
                                        <li><a href="../index.jsp">INICIO</a>  </li>
					<li><a href="liga.jsp">LIGA</a>  </li>
					<li><a href="equipo.jsp">EQUIPOS</a> </li>
                                        <li><a href="jugador.jsp">JUGADORES</a> </li>
                                        <img src="../imagenes/pelota.png"/>
				</ul>
			</li>
						
		</ul>
	</div>
	<!-- end sidebar -->
	<div id="extra" style="clear: both;">&nbsp;</div>
</div>
<!-- end page -->
<!-- start footer -->
<div id="footer">
	<p class="legal"> &copy;2012 Usac. All Rights Reserved.
		&nbsp;&nbsp;&bull;&nbsp;&nbsp;		
</div>
<!-- end footer -->
</body>
</html>
